/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.lance.other;

import za.ac.lance.other.Account;


/**
 *
 * @author Lance
 */
public class SpecialCurrentAccount extends CurrentAccount implements Account
{

    private int defaultPeriod;

    public SpecialCurrentAccount(int balance, int period)
    {
        super(balance, period);
    }

    @Override
    public boolean closeAccount()
    {
        if (super.getBalance() > 0 && super.getPeriod() > defaultPeriod)
        {
            return true;
        }
        else
        {
            return false;
        }
    }

    public int getDefaultPeriod()
    {
        return defaultPeriod;
    }

    public void setDefaultPeriod(int defaultPeriod)
    {
        this.defaultPeriod = defaultPeriod;
    }
}
